#include "MainFrame/ToolBar/ToolBarBase.h"
#include <QToolButton>

ToolBarBase::ToolBarBase(QWidget *parent) :
    QToolBar(parent)
{
    setIconSize(QSize(30, 30));
    setToolButtonStyle(Qt::ToolButtonIconOnly);
}

ToolBarBase::~ToolBarBase()
{

}

QToolButton *ToolBarBase::addToolButton(const QString &strActionName)
{
    QToolButton* pButton = new QToolButton(this);
    pButton->setProperty("tool", "big");
    pButton->setIcon(QIcon(":/Icons/Tools/"+strActionName+".png"));
    pButton->setObjectName(strActionName);
    pButton->setAutoExclusive(true);
    pButton->setCheckable(true);
    this->addWidget(pButton);
    return pButton;
}
